<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Issue Book Details</title>
<script>
	
	function validate() {
		var bookname = document.form.bookname.value;
		var authorname = document.form.authorname.value;
		var price = document.form.price.value;
		
		if (bookname == "") {
			alert("Enter bookname!");
			return false;
		}
		if (authorname == "") {
			alert("Enter authorname!");
			return false;
		}
		if (price == "") {
			alert("Enter price!");
			return false;
		}
		if(isNaN(parseFloat(price))){
			alert("Enter Price Eg:105.20");
			return false;
		}
		return true;
	}
</script>

</head>
<body style="background-color: grey">
	<form name="form" action="BookRegistration1" method="post" onsubmit="javascript:return validate();">
		<fieldset>
			<legend align="top">
				<h2 style="color: red">New Book Registration</h2>
			</legend>
			<center>
				<table style="background-color: #99CCFF" cellpadding="3px"
					cellspacing="20px">


					<tr align="left">
						<td>Book Name</td>
						<td align="left"><input type="text" name="bookname" value="" />
						</td>
					</tr>
					<tr align="left">
						<td>Author Name</td>
						<td align="left"><input type="text" name="authorname"
							value="" /></td>
					</tr>
					<tr align="left">
						<td>Price</td>
						<td align="left"><input type="text" name="price" value="" />
						</td>
					</tr>
					<tr>
						<td align="left"><input type="hidden" name="status" value="1" />
						</td>
				</table>
				<br> <input type="submit" name="submit" value="Submit" /> <input
					type="reset" value="cancel" />

			</center>

		</fieldset>
	</form>
</body>

</html>